package cn.fan.feign.clients;

import cn.fan.feign.clients.fallback.UserClientFallbackFactory;
import cn.fan.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@FeignClient(value = "userpower",fallbackFactory = UserClientFallbackFactory.class)
public interface UserClient {
//    @GetMapping("/users/sysUser")
//    User sysUser();
//
//    @GetMapping("/users/sysUserId")
//    long sysUserId();

    @GetMapping("/users/get/{id}")
    R get(@PathVariable("id") long id);

    @PostMapping("/users/list")
    R list(@RequestBody Map<String,Object> map);
}
